﻿using MahApps.Metro.Controls;
using System.Windows;
using System.Windows.Controls;

namespace MetroApp.Web.Views
{
    /// <summary>
    /// Settings.xaml 的交互逻辑
    /// </summary>
    public partial class Settings : Page
    {

        public Settings()
        {
            InitializeComponent();
        }

        private void ToggleSwitch_Toggled(object sender, RoutedEventArgs e)
        {
            ToggleSwitch toggleSwitch = sender as ToggleSwitch;
            if (toggleSwitch != null)
            {
                if (toggleSwitch.IsOn == true)
                {
                    progress.IsActive = true;
                    progress.Visibility = Visibility.Visible;
                }
                else
                {
                    progress.IsActive = false;
                    progress.Visibility = Visibility.Collapsed;
                }
            }
        }

        public enum TransitionType
        {
            /// <summary>
            /// Use the VisualState DefaultTransition
            /// </summary>
            Default,

            /// <summary>
            /// Use the VisualState Normal
            /// </summary>
            Normal,

            /// <summary>
            /// Use the VisualState UpTransition
            /// </summary>
            Up,

            /// <summary>
            /// Use the VisualState DownTransition
            /// </summary>
            Down,

            /// <summary>
            /// Use the VisualState RightTransition
            /// </summary>
            Right,

            /// <summary>
            /// Use the VisualState RightReplaceTransition
            /// </summary>
            RightReplace,

            /// <summary>
            /// Use the VisualState LeftTransition
            /// </summary>
            Left,

            /// <summary>
            /// Use the VisualState LeftReplaceTransition
            /// </summary>
            LeftReplace,

            /// <summary>
            /// Use a custom VisualState, the name must be set using CustomVisualStatesName property
            /// </summary>
            Custom
        }
    }
}
